{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "227c6e5c-fcbd-41a0-afd3-1973857107ff",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "New https://pypi.org/project/ultralytics/8.0.143 available 😃 Update with 'pip install -U ultralytics'\n",
      "Ultralytics YOLOv8.0.112 🚀 Python-3.9.10 torch-1.12.1+cu113 CUDA:0 (NVIDIA GeForce GTX 1080 Ti, 11178MiB)\n",
      "WARNING ⚠️ Upgrade to torch>=2.0.0 for deterministic training.\n",
      "\u001b[34m\u001b[1myolo/engine/trainer: \u001b[0mtask=detect, mode=train, model=./yolov8m.pt, data=./trainval/dataset.yaml, epochs=20, patience=50, batch=3, imgsz=1280, save=True, save_period=-1, cache=False, device=0, workers=8, project=None, name=None, exist_ok=False, pretrained=False, optimizer=SGD, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=0, resume=False, amp=True, fraction=1.0, profile=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, show=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, vid_stride=1, line_width=None, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, boxes=True, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, cfg=None, v5loader=False, tracker=botsort.yaml, save_dir=runs/detect/train6\n",
      "Overriding model.yaml nc=80 with nc=14\n",
      "\n",
      "                   from  n    params  module                                       arguments                     \n",
      "  0                  -1  1      1392  ultralytics.nn.modules.conv.Conv             [3, 48, 3, 2]                 \n",
      "  1                  -1  1     41664  ultralytics.nn.modules.conv.Conv             [48, 96, 3, 2]                \n",
      "  2                  -1  2    111360  ultralytics.nn.modules.block.C2f             [96, 96, 2, True]             \n",
      "  3                  -1  1    166272  ultralytics.nn.modules.conv.Conv             [96, 192, 3, 2]               \n",
      "  4                  -1  4    813312  ultralytics.nn.modules.block.C2f             [192, 192, 4, True]           \n",
      "  5                  -1  1    664320  ultralytics.nn.modules.conv.Conv             [192, 384, 3, 2]              \n",
      "  6                  -1  4   3248640  ultralytics.nn.modules.block.C2f             [384, 384, 4, True]           \n",
      "  7                  -1  1   1991808  ultralytics.nn.modules.conv.Conv             [384, 576, 3, 2]              \n",
      "  8                  -1  2   3985920  ultralytics.nn.modules.block.C2f             [576, 576, 2, True]           \n",
      "  9                  -1  1    831168  ultralytics.nn.modules.block.SPPF            [576, 576, 5]                 \n",
      " 10                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']          \n",
      " 11             [-1, 6]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 12                  -1  2   1993728  ultralytics.nn.modules.block.C2f             [960, 384, 2]                 \n",
      " 13                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']          \n",
      " 14             [-1, 4]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 15                  -1  2    517632  ultralytics.nn.modules.block.C2f             [576, 192, 2]                 \n",
      " 16                  -1  1    332160  ultralytics.nn.modules.conv.Conv             [192, 192, 3, 2]              \n",
      " 17            [-1, 12]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 18                  -1  2   1846272  ultralytics.nn.modules.block.C2f             [576, 384, 2]                 \n",
      " 19                  -1  1   1327872  ultralytics.nn.modules.conv.Conv             [384, 384, 3, 2]              \n",
      " 20             [-1, 9]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 21                  -1  2   4207104  ultralytics.nn.modules.block.C2f             [960, 576, 2]                 \n",
      " 22        [15, 18, 21]  1   3783802  ultralytics.nn.modules.head.Detect           [14, [192, 384, 576]]         \n",
      "Model summary: 295 layers, 25864426 parameters, 25864410 gradients, 79.1 GFLOPs\n",
      "\n",
      "Transferred 469/475 items from pretrained weights\n",
      "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/detect/train6', view at http://localhost:6006/\n",
      "\u001b[34m\u001b[1mAMP: \u001b[0mrunning Automatic Mixed Precision (AMP) checks with YOLOv8n...\n",
      "\u001b[34m\u001b[1mAMP: \u001b[0mchecks passed ✅\n",
      "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01) with parameter groups 77 weight(decay=0.0), 84 weight(decay=0.0004921875), 83 bias\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mScanning /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/labels.cache... 5102 images, 0 backgrounds, 0 corrupt: 100%|██████████| 5102/5102 [00:00<?, ?it/s]\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/0133.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/0519.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/0961.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/1546.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/1650.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/2197.jpg: 1 duplicate labels removed\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/3862.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/4718.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1mtrain: \u001b[0mWARNING ⚠️ /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/train/images/4846.jpg: corrupt JPEG restored and saved\n",
      "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
      "\u001b[34m\u001b[1mval: \u001b[0mScanning /home/lyz/work/kaggle/科大讯飞2023/基于图像识别算法的无人船障碍物检测挑战赛/trainval/val/labels.cache... 567 images, 0 backgrounds, 0 corrupt: 100%|██████████| 567/567 [00:00<?, ?it/s]\n",
      "Plotting labels to runs/detect/train6/labels.jpg... \n",
      "Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "Image sizes 1280 train, 1280 val\n",
      "Using 3 dataloader workers\n",
      "Logging results to \u001b[1mruns/detect/train6\u001b[0m\n",
      "Starting training for 20 epochs...\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n",
      "  0%|          | 0/1701 [00:00<?, ?it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.31G      1.909      8.489      1.349         21       1280:   0%|          | 5/1701 [00:03<17:50,  1.58it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.821      7.446      1.462          9       1280:   3%|▎         | 56/1701 [00:34<16:54,  1.62it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.824      5.463      1.428          9       1280:  11%|█▏        | 192/1701 [01:58<15:22,  1.64it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.798      4.802      1.419         33       1280:  16%|█▌        | 264/1701 [02:41<14:39,  1.63it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.799      4.772       1.42         30       1280:  16%|█▌        | 268/1701 [02:44<14:35,  1.64it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.783      4.524      1.411         20       1280:  18%|█▊        | 307/1701 [03:08<14:05,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.769      4.445      1.407         20       1280:  19%|█▉        | 319/1701 [03:15<13:58,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.768      4.431      1.406         29       1280:  19%|█▉        | 321/1701 [03:16<13:56,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.764      4.381      1.405         12       1280:  19%|█▉        | 330/1701 [03:22<13:56,  1.64it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.764       4.35      1.403         36       1280:  20%|█▉        | 335/1701 [03:25<13:50,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.757      4.235      1.397         19       1280:  21%|██        | 357/1701 [03:38<13:36,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.738      4.021      1.385         17       1280:  24%|██▍       | 404/1701 [04:07<13:04,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.734      3.995      1.385          7       1280:  24%|██▍       | 410/1701 [04:10<12:59,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.723      3.805      1.376         32       1280:  27%|██▋       | 463/1701 [04:42<12:35,  1.64it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.716       3.68      1.371         21       1280:  30%|██▉       | 508/1701 [05:10<12:07,  1.64it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.695      3.521      1.363         11       1280:  33%|███▎      | 563/1701 [05:43<11:29,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.693      3.493      1.361         22       1280:  34%|███▎      | 573/1701 [05:49<11:21,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.688      3.424      1.357         14       1280:  36%|███▌      | 604/1701 [06:08<11:08,  1.64it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.688      3.393      1.358          5       1280:  36%|███▋      | 617/1701 [06:16<10:55,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.683      3.299      1.358          7       1280:  39%|███▉      | 664/1701 [06:44<10:29,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.683      3.266      1.358         18       1280:  40%|████      | 682/1701 [06:55<10:13,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.681      3.226      1.357         35       1280:  41%|████▏     | 702/1701 [07:07<10:02,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.677      3.162      1.356         25       1280:  44%|████▎     | 744/1701 [07:32<09:40,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.675      3.058      1.356         12       1280:  48%|████▊     | 810/1701 [08:12<08:57,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.674      3.038      1.356         12       1280:  49%|████▊     | 825/1701 [08:21<08:49,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.667      2.944      1.352         19       1280:  52%|█████▏    | 891/1701 [09:01<08:11,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.666      2.893      1.349         17       1280:  55%|█████▍    | 933/1701 [09:26<07:43,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.657      2.816      1.343         22       1280:  58%|█████▊    | 993/1701 [10:02<07:07,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.656      2.814      1.343         17       1280:  58%|█████▊    | 995/1701 [10:04<07:04,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.651       2.77      1.339         16       1280:  61%|██████    | 1037/1701 [10:29<06:40,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.646      2.664      1.332         17       1280:  67%|██████▋   | 1144/1701 [11:33<05:36,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.646      2.661      1.333         10       1280:  67%|██████▋   | 1147/1701 [11:35<05:33,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.644      2.648      1.333          8       1280:  68%|██████▊   | 1160/1701 [11:43<05:23,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.643      2.641      1.332         10       1280:  69%|██████▊   | 1166/1701 [11:47<05:20,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.641      2.613      1.329         12       1280:  70%|███████   | 1196/1701 [12:05<05:02,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.636      2.532      1.327         10       1280:  76%|███████▌  | 1297/1701 [13:05<04:02,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.633      2.508      1.323         10       1280:  78%|███████▊  | 1328/1701 [13:24<03:43,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.629      2.454       1.32         11       1280:  83%|████████▎ | 1410/1701 [14:13<02:54,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.628       2.43      1.318          8       1280:  85%|████████▌ | 1449/1701 [14:37<02:31,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.627      2.403      1.316         22       1280:  88%|████████▊ | 1494/1701 [15:04<02:03,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.626      2.401      1.316         17       1280:  88%|████████▊ | 1499/1701 [15:07<02:01,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.626      2.393      1.316          4       1280:  89%|████████▉ | 1511/1701 [15:14<01:54,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.625      2.386      1.316         13       1280:  90%|████████▉ | 1526/1701 [15:23<01:45,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.624      2.382      1.316         18       1280:  90%|█████████ | 1533/1701 [15:27<01:41,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.624      2.382      1.316          7       1280:  90%|█████████ | 1536/1701 [15:29<01:38,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.624      2.377      1.316         12       1280:  91%|█████████ | 1544/1701 [15:34<01:34,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.621      2.355      1.315         14       1280:  93%|█████████▎| 1586/1701 [15:59<01:08,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.621      2.346      1.313         20       1280:  94%|█████████▍| 1603/1701 [16:09<00:59,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.623      2.321      1.313         21       1280:  97%|█████████▋| 1650/1701 [16:38<00:30,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.623      2.309      1.313         26       1280:  99%|█████████▊| 1677/1701 [16:54<00:14,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       1/20      5.32G      1.622      2.298      1.313         42       1280: 100%|██████████| 1701/1701 [17:08<00:00,  1.65it/s]\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  21%|██        | 20/95 [00:05<00:19,  3.95it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  33%|███▎      | 31/95 [00:07<00:15,  4.02it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  52%|█████▏    | 49/95 [00:12<00:11,  4.01it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  68%|██████▊   | 65/95 [00:16<00:07,  4.01it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  75%|███████▍  | 71/95 [00:17<00:06,  3.99it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  82%|████████▏ | 78/95 [00:19<00:04,  4.02it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  93%|█████████▎| 88/95 [00:22<00:01,  4.00it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100%|██████████| 95/95 [00:23<00:00,  4.00it/s]\n",
      "                   all        567       1803      0.557      0.549      0.549      0.278\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n",
      "       2/20      5.47G      1.575      1.573      1.295         11       1280:   1%|▏         | 25/1701 [00:15<16:51,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.581       1.56      1.289         17       1280:   2%|▏         | 39/1701 [00:23<16:33,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.539      1.505      1.252         20       1280:   4%|▍         | 66/1701 [00:39<16:24,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.491      1.415      1.223         15       1280:   6%|▌         | 101/1701 [01:00<15:59,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.502       1.42      1.229         11       1280:   7%|▋         | 120/1701 [01:12<15:46,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.502      1.411       1.23         11       1280:   7%|▋         | 126/1701 [01:15<15:41,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.503      1.412      1.231         21       1280:   7%|▋         | 127/1701 [01:16<15:41,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.498      1.413      1.232         17       1280:   8%|▊         | 136/1701 [01:21<15:36,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.502      1.401      1.249         11       1280:  11%|█▏        | 194/1701 [01:56<15:01,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.517      1.404      1.259          8       1280:  13%|█▎        | 226/1701 [02:15<14:43,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.515      1.403      1.259         32       1280:  18%|█▊        | 302/1701 [03:01<13:56,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.513      1.403      1.259         15       1280:  19%|█▉        | 321/1701 [03:12<13:55,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.517        1.4       1.26         15       1280:  21%|██        | 358/1701 [03:35<13:30,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.511      1.413      1.258         18       1280:  24%|██▎       | 400/1701 [04:00<12:58,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G       1.51      1.409      1.257         11       1280:  24%|██▍       | 405/1701 [04:03<12:59,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.509      1.407      1.256          4       1280:  25%|██▍       | 422/1701 [04:13<12:49,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.507      1.409      1.255          7       1280:  25%|██▌       | 428/1701 [04:17<12:43,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.507       1.41      1.255         11       1280:  25%|██▌       | 429/1701 [04:17<12:51,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.512      1.415      1.259         12       1280:  28%|██▊       | 482/1701 [04:49<12:10,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.516      1.422      1.261         23       1280:  30%|███       | 515/1701 [05:09<11:51,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.516      1.424       1.26         18       1280:  31%|███       | 531/1701 [05:19<11:44,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.521      1.422      1.261         23       1280:  33%|███▎      | 565/1701 [05:39<11:21,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.526      1.412      1.263         10       1280:  43%|████▎     | 737/1701 [07:22<09:37,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.527      1.412      1.263         33       1280:  43%|████▎     | 738/1701 [07:23<09:37,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.525      1.411      1.263         11       1280:  44%|████▍     | 746/1701 [07:28<09:35,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.532      1.414      1.266          9       1280:  45%|████▌     | 773/1701 [07:44<09:16,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.532      1.414      1.265          6       1280:  46%|████▌     | 778/1701 [07:47<09:18,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.533      1.414      1.264         32       1280:  49%|████▊     | 826/1701 [08:16<08:44,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.535      1.415      1.264         14       1280:  50%|████▉     | 842/1701 [08:25<08:33,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.533      1.411      1.265         17       1280:  53%|█████▎    | 900/1701 [09:00<08:03,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.533      1.411      1.266         19       1280:  54%|█████▍    | 917/1701 [09:10<07:49,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.533      1.406      1.267         14       1280:  56%|█████▌    | 947/1701 [09:28<07:32,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.536      1.406      1.266          9       1280:  58%|█████▊    | 986/1701 [09:52<07:07,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.534      1.407      1.266         19       1280:  64%|██████▍   | 1090/1701 [10:54<06:07,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.536      1.407      1.265         10       1280:  66%|██████▌   | 1126/1701 [11:16<05:46,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.539      1.408      1.268         15       1280:  73%|███████▎  | 1244/1701 [12:26<04:33,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.538      1.408      1.268         24       1280:  73%|███████▎  | 1249/1701 [12:29<04:34,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.537      1.408      1.268         11       1280:  74%|███████▍  | 1261/1701 [12:37<04:23,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.538      1.408      1.268          8       1280:  75%|███████▌  | 1284/1701 [12:50<04:10,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.541      1.411      1.269         35       1280:  77%|███████▋  | 1309/1701 [13:05<03:54,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.541      1.411      1.269          4       1280:  77%|███████▋  | 1310/1701 [13:06<03:54,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.541      1.412      1.269         31       1280:  78%|███████▊  | 1329/1701 [13:17<03:43,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.543      1.409      1.269         33       1280:  83%|████████▎ | 1407/1701 [14:04<02:57,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.546       1.41       1.27         64       1280:  85%|████████▍ | 1439/1701 [14:23<02:36,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.547      1.414      1.272         13       1280:  85%|████████▌ | 1453/1701 [14:32<02:28,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.549      1.414      1.273         10       1280:  88%|████████▊ | 1498/1701 [14:59<02:01,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.549      1.413      1.273         18       1280:  91%|█████████▏| 1553/1701 [15:32<01:28,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.549      1.413      1.273         14       1280:  91%|█████████▏| 1555/1701 [15:33<01:27,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G       1.55      1.414      1.274          7       1280:  92%|█████████▏| 1568/1701 [15:41<01:19,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.552      1.416      1.275         16       1280:  96%|█████████▋| 1640/1701 [16:24<00:36,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.551      1.415      1.275          7       1280:  97%|█████████▋| 1653/1701 [16:32<00:28,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       2/20      5.48G      1.553      1.415      1.277          6       1280: 100%|██████████| 1701/1701 [17:01<00:00,  1.67it/s]\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  21%|██        | 20/95 [00:05<00:18,  3.97it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  33%|███▎      | 31/95 [00:07<00:15,  4.00it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  52%|█████▏    | 49/95 [00:12<00:11,  3.99it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  68%|██████▊   | 65/95 [00:16<00:07,  3.99it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  75%|███████▍  | 71/95 [00:17<00:06,  3.96it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  82%|████████▏ | 78/95 [00:19<00:04,  4.00it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95):  93%|█████████▎| 88/95 [00:22<00:01,  3.96it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100%|██████████| 95/95 [00:23<00:00,  4.00it/s]\n",
      "                   all        567       1803      0.481       0.52      0.524      0.265\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n",
      "       3/20      5.47G      1.569      1.423      1.333         14       1280:   1%|▏         | 23/1701 [00:13<16:41,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.573      1.506      1.367         16       1280:   2%|▏         | 33/1701 [00:19<16:38,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.594      1.444      1.342         34       1280:   4%|▍         | 68/1701 [00:40<16:17,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.568      1.395      1.319         10       1280:   7%|▋         | 124/1701 [01:14<15:45,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.567      1.388      1.312         14       1280:   8%|▊         | 140/1701 [01:23<15:34,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G       1.57      1.394       1.31         15       1280:   9%|▉         | 155/1701 [01:32<15:26,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.573      1.405       1.31         15       1280:  11%|█         | 189/1701 [01:53<15:05,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.578      1.398      1.319         11       1280:  15%|█▍        | 254/1701 [02:32<14:32,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.577      1.387      1.319         22       1280:  17%|█▋        | 293/1701 [02:55<14:02,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.582      1.397      1.322          7       1280:  18%|█▊        | 309/1701 [03:05<13:55,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.576      1.401      1.324         17       1280:  22%|██▏       | 368/1701 [03:40<13:20,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.567      1.392      1.321         10       1280:  24%|██▎       | 403/1701 [04:01<12:58,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.572      1.391       1.32          6       1280:  25%|██▌       | 433/1701 [04:19<12:42,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.575      1.398      1.321         10       1280:  27%|██▋       | 454/1701 [04:32<12:25,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.576      1.399      1.323          4       1280:  28%|██▊       | 471/1701 [04:42<12:16,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.575        1.4      1.323         14       1280:  29%|██▊       | 487/1701 [04:52<12:05,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.578      1.399      1.323         30       1280:  29%|██▉       | 494/1701 [04:56<12:09,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.578      1.402      1.325         27       1280:  30%|███       | 513/1701 [05:07<11:55,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.577      1.402      1.325         11       1280:  30%|███       | 518/1701 [05:10<11:48,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.579      1.407      1.323         20       1280:  33%|███▎      | 555/1701 [05:32<11:27,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.579      1.411      1.324         12       1280:  33%|███▎      | 565/1701 [05:38<11:23,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581      1.411      1.327         17       1280:  34%|███▎      | 574/1701 [05:44<11:12,  1.68it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581       1.41      1.328         15       1280:  34%|███▍      | 584/1701 [05:50<11:10,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.578       1.42      1.332         33       1280:  46%|████▌     | 778/1701 [07:46<09:11,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.579      1.422       1.33         17       1280:  47%|████▋     | 800/1701 [07:59<08:59,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.578      1.427      1.332          9       1280:  48%|████▊     | 810/1701 [08:06<08:54,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.576      1.427      1.332         18       1280:  48%|████▊     | 823/1701 [08:13<08:50,  1.65it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.575      1.426      1.332         26       1280:  49%|████▊     | 825/1701 [08:15<08:46,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.576      1.429       1.33         11       1280:  50%|████▉     | 850/1701 [08:29<08:29,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.579       1.43       1.33         12       1280:  52%|█████▏    | 878/1701 [08:46<08:14,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.577      1.428      1.329         21       1280:  52%|█████▏    | 893/1701 [08:55<08:03,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.576      1.426      1.328         17       1280:  53%|█████▎    | 905/1701 [09:03<07:57,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.577      1.426      1.329         22       1280:  53%|█████▎    | 908/1701 [09:04<07:55,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G       1.58      1.427      1.328         14       1280:  55%|█████▌    | 943/1701 [09:25<07:33,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581      1.429       1.33         14       1280:  56%|█████▋    | 957/1701 [09:34<07:25,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581      1.428      1.329         16       1280:  59%|█████▉    | 1011/1701 [10:06<06:53,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581      1.428      1.329          8       1280:  60%|██████    | 1029/1701 [10:17<06:42,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581      1.428      1.328         18       1280:  61%|██████    | 1032/1701 [10:19<06:39,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.581      1.428      1.329         18       1280:  61%|██████    | 1037/1701 [10:22<06:37,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G       1.58       1.43      1.329         12       1280:  61%|██████▏   | 1046/1701 [10:27<06:32,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.579      1.431      1.328          7       1280:  62%|██████▏   | 1053/1701 [10:32<06:28,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.578      1.428      1.326         26       1280:  65%|██████▍   | 1101/1701 [11:00<06:02,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G       1.58      1.425      1.325         24       1280:  67%|██████▋   | 1135/1701 [11:21<05:40,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.582      1.431      1.326         20       1280:  69%|██████▉   | 1177/1701 [11:46<05:15,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G       1.58      1.432      1.324          7       1280:  71%|███████   | 1200/1701 [12:00<04:59,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.582      1.434      1.326         18       1280:  78%|███████▊  | 1325/1701 [13:15<03:45,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.582      1.435      1.326         13       1280:  78%|███████▊  | 1330/1701 [13:18<03:42,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.583      1.441      1.324         16       1280:  82%|████████▏ | 1394/1701 [13:56<03:04,  1.66it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.584      1.445      1.323         44       1280:  84%|████████▍ | 1425/1701 [14:15<02:45,  1.67it/s]Corrupt JPEG data: 2 extraneous bytes before marker 0xd9\n",
      "       3/20      5.47G      1.584      1.445      1.323         11       1280:  84%|████████▍ | 1430/1701 [14:18<02:42,  1.67it/s]\n"
     ]
    }
   ],
   "source": [
    "from ultralytics import YOLO\n",
    "model = YOLO(\"./yolov8m.pt\")\n",
    "results = model.train(data=\"./trainval/dataset.yaml\", epochs=20, batch=3, imgsz=1280, device='0')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6b5f9ff4-b772-4697-a408-7527047aa159",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "unmanned-ship-obstacle/\n",
      "unmanned-ship-obstacle/best.pt\n",
      "unmanned-ship-obstacle/.ipynb_checkpoints/\n",
      "unmanned-ship-obstacle/.ipynb_checkpoints/run-checkpoint.py\n",
      "unmanned-ship-obstacle/run.py\n"
     ]
    }
   ],
   "source": [
    "!tar -cvzf unmanned-ship-obstacle.tar.gz unmanned-ship-obstacle"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "535d583a-911a-41fa-bea6-3d78f7df9000",
   "metadata": {},
   "source": [
    "run.py内容\n",
    "\n",
    "```python\n",
    "from ultralytics import YOLO\n",
    "import glob\n",
    "model = YOLO(\"./best.pt\")\n",
    "\n",
    "for path in glob.glob('/work/data/unmanned-ship-obstacle-detection-test-set/*'):\n",
    "    predictions = model.predict(path, imgsz=1280)\n",
    "    with open(\"/work/output/\" + path.split('/')[-1][:-4] + '.txt', 'w') as file:\n",
    "        for idx, prediction in enumerate(predictions[0].boxes.xywhn):\n",
    "            cls = int(predictions[0].boxes.cls[idx].item())\n",
    "            score = predictions[0].boxes.conf[idx].item()\n",
    "            file.write(f\"{cls} {prediction[0].item()} {prediction[1].item()} {prediction[2].item()} {prediction[3].item()} {score}\\n\")\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ed73f0a3-957a-49ab-aebd-91fda2d3fb2e",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 1 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   806.20 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 2 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   774.74 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 3 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   775.78 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 4 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   775.12 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 5 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   773.56 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 6 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   772.77 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 7 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   19s   775.08 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 8 of 13, 15MB] [1 of 1]\n",
      " 15728640 of 15728640   100% in   21s   724.75 kB/s  done\n",
      "upload: 'unmanned-ship-obstacle.tar.gz' -> 's3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz'  [part 9 of 13, 15MB] [1 of 1]\n",
      " 13303808 of 15728640    84% in   17s   763.60 kB/s"
     ]
    }
   ],
   "source": [
    "!s3cmd put unmanned-ship-obstacle.tar.gz s3://ai-competition/0fs76epw/unmanned-ship-obstacle.tar.gz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "83b70de8-398c-4860-a68c-bfc5cca4da46",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3.10"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.10"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
